 const arrToObj = require('../lib/arrToObj.js');
 const addCompare = require('../lib/addStudent.js');
 const addStuInfo = require('../lib/addStudent.js');
 const print = require('../lib/print.js');
 var readlineSync = require('readline-sync');

    function menu(){
        let str = `1. 添加学生
        2. 生成成绩单
        3. 退出
        请输入你的选择（1～3）：`;
        console.log(str);
        return str;
    }

function main(){
     menu();
    let num = readlineSync.question();
    if(num === "1"){
        addCompare();
    }else if(num === "2"){
        print(arr);
    }else if(num === "3"){
        console.log("退出");
        
    }
}

 let cc = main();
 console.log(cc);